#include "widget.h"
#include "ui_widget.h"
#include<QString>
#include<fstream>
#include<QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    std::ifstream file("C:/Users/赵/Desktop/hero.txt");
    std::string s;
    while(getline(file,s)){
        ui->comboBox->addItem(QString::fromStdString(s));
        qDebug()<<QString::fromStdString(s)<<endl;
    }
    file.close();

}

Widget::~Widget()
{
    delete ui;
}

